Optimal. Leaf size=131 \[ \frac {i d \text {Li}_2\left (-i e^{i (a+b x)}\right )}{b^2}-\frac {i d \text {Li}_2\left (i e^{i (a+b x)}\right )}{b^2}-\frac {d \tanh ^{-1}(\cos (a+b x))}{b^2}-\frac {(c+d x) \csc (a+b x)}{b}+\frac {(c+d x) \tanh ^{-1}(\sin (a+b x))}{b}-\frac {2 i d x \tan ^{-1}\left (e^{i (a+b x)}\right )}{b}-\frac {d x \tanh ^{-1}(\sin (a+b x))}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 131, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 10, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {2621, 321, 207, 4420, 6271, 12, 4181, 2279, 2391, 3770} \[ \frac {i d \text {PolyLog}\left (2,-i e^{i (a+b x)}\right )}{b^2}-\frac {i d \text {PolyLog}\left (2,i e^{i (a+b x)}\right )}{b^2}-\frac {d \tanh ^{-1}(\cos (a+b x))}{b^2}-\frac {(c+d x) \csc (a+b x)}{b}+\frac {(c+d x) \tanh ^{-1}(\sin (a+b x))}{b}-\frac {2 i d x \tan ^{-1}\left (e^{i (a+b x)}\right )}{b}-\frac {d x \tanh ^{-1}(\sin (a+b x))}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 207
Rule 321
Rule 2279
Rule 2391
Rule 2621
Rule 3770
Rule 4181
Rule 4420
Rule 6271
Rubi steps
\begin {align*} \int (c+d x) \csc ^2(a+b x) \sec (a+b x) \, dx &=\frac {(c+d x) \tanh ^{-1}(\sin (a+b x))}{b}-\frac {(c+d x) \csc (a+b x)}{b}-d \int \left (\frac {\tanh ^{-1}(\sin (a+b x))}{b}-\frac {\csc (a+b x)}{b}\right ) \, dx\\ &=\frac {(c+d x) \tanh ^{-1}(\sin (a+b x))}{b}-\frac {(c+d x) \csc (a+b x)}{b}-\frac {d \int \tanh ^{-1}(\sin (a+b x)) \, dx}{b}+\frac {d \int \csc (a+b x) \, dx}{b}\\ &=-\frac {d \tanh ^{-1}(\cos (a+b x))}{b^2}-\frac {d x \tanh ^{-1}(\sin (a+b x))}{b}+\frac {(c+d x) \tanh ^{-1}(\sin (a+b x))}{b}-\frac {(c+d x) \csc (a+b x)}{b}+\frac {d \int b x \sec (a+b x) \, dx}{b}\\ &=-\frac {d \tanh ^{-1}(\cos (a+b x))}{b^2}-\frac {d x \tanh ^{-1}(\sin (a+b x))}{b}+\frac {(c+d x) \tanh ^{-1}(\sin (a+b x))}{b}-\frac {(c+d x) \csc (a+b x)}{b}+d \int x \sec (a+b x) \, dx\\ &=-\frac {2 i d x \tan ^{-1}\left (e^{i (a+b x)}\right )}{b}-\frac {d \tanh ^{-1}(\cos (a+b x))}{b^2}-\frac {d x \tanh ^{-1}(\sin (a+b x))}{b}+\frac {(c+d x) \tanh ^{-1}(\sin (a+b x))}{b}-\frac {(c+d x) \csc (a+b x)}{b}-\frac {d \int \log \left (1-i e^{i (a+b x)}\right ) \, dx}{b}+\frac {d \int \log \left (1+i e^{i (a+b x)}\right ) \, dx}{b}\\ &=-\frac {2 i d x \tan ^{-1}\left (e^{i (a+b x)}\right )}{b}-\frac {d \tanh ^{-1}(\cos (a+b x))}{b^2}-\frac {d x \tanh ^{-1}(\sin (a+b x))}{b}+\frac {(c+d x) \tanh ^{-1}(\sin (a+b x))}{b}-\frac {(c+d x) \csc (a+b x)}{b}+\frac {(i d) \operatorname {Subst}\left (\int \frac {\log (1-i x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^2}-\frac {(i d) \operatorname {Subst}\left (\int \frac {\log (1+i x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^2}\\ &=-\frac {2 i d x \tan ^{-1}\left (e^{i (a+b x)}\right )}{b}-\frac {d \tanh ^{-1}(\cos (a+b x))}{b^2}-\frac {d x \tanh ^{-1}(\sin (a+b x))}{b}+\frac {(c+d x) \tanh ^{-1}(\sin (a+b x))}{b}-\frac {(c+d x) \csc (a+b x)}{b}+\frac {i d \text {Li}_2\left (-i e^{i (a+b x)}\right )}{b^2}-\frac {i d \text {Li}_2\left (i e^{i (a+b x)}\right )}{b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 2.91, size = 517, normalized size = 3.95 \[ \frac {d \log \left (\sin \left (\frac {1}{2} (a+b x)\right )\right )}{b^2}-\frac {d \log \left (\cos \left (\frac {1}{2} (a+b x)\right )\right )}{b^2}+\frac {d \left (a \cos \left (\frac {1}{2} (a+b x)\right )-(a+b x) \cos \left (\frac {1}{2} (a+b x)\right )\right ) \csc \left (\frac {1}{2} (a+b x)\right )}{2 b^2}+\frac {d \left (a \sin \left (\frac {1}{2} (a+b x)\right )-(a+b x) \sin \left (\frac {1}{2} (a+b x)\right )\right ) \sec \left (\frac {1}{2} (a+b x)\right )}{2 b^2}-\frac {c \csc (a+b x) \, _2F_1\left (-\frac {1}{2},1;\frac {1}{2};\sin ^2(a+b x)\right )}{b}-\frac {d x \left (-i \left (\text {Li}_2\left (\frac {1}{2} \left ((1+i)-(1-i) \tan \left (\frac {1}{2} (a+b x)\right )\right )\right )+\log \left (1+i \tan \left (\frac {1}{2} (a+b x)\right )\right ) \log \left (\left (\frac {1}{2}-\frac {i}{2}\right ) \left (\tan \left (\frac {1}{2} (a+b x)\right )+1\right )\right )\right )+i \left (\text {Li}_2\left (\left (-\frac {1}{2}-\frac {i}{2}\right ) \left (\tan \left (\frac {1}{2} (a+b x)\right )+i\right )\right )+\log \left (1-i \tan \left (\frac {1}{2} (a+b x)\right )\right ) \log \left (\left (\frac {1}{2}+\frac {i}{2}\right ) \left (\tan \left (\frac {1}{2} (a+b x)\right )+1\right )\right )\right )-i \left (\text {Li}_2\left (\frac {1}{2} \left ((1-i) \tan \left (\frac {1}{2} (a+b x)\right )+(1+i)\right )\right )+\log \left (1-i \tan \left (\frac {1}{2} (a+b x)\right )\right ) \log \left (\left (-\frac {1}{2}+\frac {i}{2}\right ) \left (\tan \left (\frac {1}{2} (a+b x)\right )-1\right )\right )\right )+i \left (\text {Li}_2\left (\frac {1}{2} \left ((1+i) \tan \left (\frac {1}{2} (a+b x)\right )+(1-i)\right )\right )+\log \left (1+i \tan \left (\frac {1}{2} (a+b x)\right )\right ) \log \left (\left (-\frac {1}{2}-\frac {i}{2}\right ) \left (\tan \left (\frac {1}{2} (a+b x)\right )-1\right )\right )\right )+a \log \left (1-\tan \left (\frac {1}{2} (a+b x)\right )\right )-a \log \left (\tan \left (\frac {1}{2} (a+b x)\right )+1\right )\right )}{b \left (-i \log \left (1-i \tan \left (\frac {1}{2} (a+b x)\right )\right )+i \log \left (1+i \tan \left (\frac {1}{2} (a+b x)\right )\right )+a\right )} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.50, size = 434, normalized size = 3.31 \[ -\frac {2 \, b d x + i \, d {\rm Li}_2\left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) + i \, d {\rm Li}_2\left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) - i \, d {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) - i \, d {\rm Li}_2\left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) \sin \left (b x + a\right ) - {\left (b c - a d\right )} \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) \sin \left (b x + a\right ) + {\left (b c - a d\right )} \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right ) \sin \left (b x + a\right ) + d \log \left (\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2}\right ) \sin \left (b x + a\right ) - {\left (b d x + a d\right )} \log \left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) \sin \left (b x + a\right ) + {\left (b d x + a d\right )} \log \left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) \sin \left (b x + a\right ) - {\left (b d x + a d\right )} \log \left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) \sin \left (b x + a\right ) + {\left (b d x + a d\right )} \log \left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) \sin \left (b x + a\right ) - d \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2}\right ) \sin \left (b x + a\right ) - {\left (b c - a d\right )} \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) \sin \left (b x + a\right ) + {\left (b c - a d\right )} \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right ) \sin \left (b x + a\right ) + 2 \, b c}{2 \, b^{2} \sin \left (b x + a\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (d x + c\right )} \csc \left (b x + a\right )^{2} \sec \left (b x + a\right )\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.13, size = 235, normalized size = 1.79 \[ -\frac {2 i {\mathrm e}^{i \left (b x +a \right )} \left (d x +c \right )}{b \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right )}+\frac {2 i d a \arctan \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}+\frac {d \ln \left ({\mathrm e}^{i \left (b x +a \right )}-1\right )}{b^{2}}-\frac {d \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right )}{b^{2}}-\frac {2 i c \arctan \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b}-\frac {i d \dilog \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}+\frac {i d \dilog \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}-\frac {d \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b}-\frac {d \ln \left (1+i {\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{2}}+\frac {d \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b}+\frac {d \ln \left (1-i {\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F(-1)] time = 0.00, size = -1, normalized size = -0.01 \[ \text {Hanged} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (c + d x\right ) \csc ^{2}{\left (a + b x \right )} \sec {\left (a + b x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________